Peer-to-peer live content delivery

ABSTRACT

A peer-to-peer live content delivery system and method enables peer-to-peer sharing of live content such as, for example, streaming video or audio. Nodes receive broadcasts of available data from neighboring nodes and determine which data blocks to request. Nodes receiving requests for data determine whether or not to accept the requests and provide the requested blocks when accepted. To enable sharing of live content, sharing of data blocks is constrained such that a node attempts to receive a particular data block prior to a playback deadline for the data block. This allows a node continuously provide an output stream of the received data such as, for example, an output of live video content to a display.

RELATED APPLICATIONS

This application claims priority from U.S. provisional application No. 61/311,141 entitled “High Performance Peer-To-Peer Assisted Live Content Delivery System and Method” filed on Mar. 5, 2010, the content of which is incorporated by reference herein in its entirety.

BACKGROUND

1. Field of the Invention

The invention relates generally to peer-to-peer networking and more particularly to distributing data such as live content over a network within some time constraint.

2. Description of the Related Art

Peer-to-peer networking provides an efficient network architecture for sharing information by creating direct connections between “nodes” without requiring information to pass through a centralized server. In a conventional peer-to-peer network, a node receives different portions of a file from a plurality of different neighboring nodes. Thus, when sharing a video file, for example, a node may receive different segments of the video from different nodes. Once all of the portions are received, the node can reconstruct the file from the separate portions.

Conventional peer-to-peer networking systems are not adapted to sharing live or streaming media content such as live video or audio. Rather, these conventional networks are only adapted to operate on discrete files rather than continuous data streams. Thus, these conventional sharing protocols are not adapted to handling the time constraints associated with delivery of streaming content. Therefore, the conventional systems do not provide any way to distribute data such as live content in a peer-to-peer network where portions of the data must be received within some time constraint.

SUMMARY

A system, method, and computer-readable storage medium enable nodes in a peer-to-peer network to share streaming data (e.g., video) and imposes time constraints such that nodes are able to continuously output the streaming data. A first node receives a data availability broadcast message from a neighboring node. The data availability broadcast message identifies one or more data blocks that the neighboring node has available for sharing. The data blocks each comprise a time-localized portion of the streaming data. The first node determines a desired data block selected from the one or more data blocks specified in the data availability broadcast message. In one embodiment, the first node makes selected the desired data block to ensure that it will receive all data blocks in the stream prior to their playback deadlines, i.e., before the first node is scheduled to output the data block (e.g., streaming a video to a display). The first node then transmits a data request message to the neighboring node specifying the desired data block. Assuming the neighboring node accepts the request, the first node receives the desired block from the neighboring node.

Beneficially, the data sharing system and method enables sharing of live content such as video or audio. By constraining the sharing of data blocks to occur within a limited time period, a node can provide a continuous output stream of the received data such as, for example, an output of live video content to a display.

The features and advantages described in the specification are not all inclusive and, in particular, many additional features and advantages will be apparent to one of ordinary skill in the art in view of the drawings, specification, and claims. Moreover, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

The teachings of the embodiments of the present invention can be readily understood by considering the following detailed description in conjunction with the accompanying drawings.

FIG. 1 illustrates an example configuration of a peer-to-peer network, in accordance with an embodiment of the present invention.

FIG. 2 illustrates examples of data structures of streaming data for sharing in the peer-to-peer network, in accordance with an embodiment of the present invention.

FIG. 3 is illustrates an example of a message passing protocol for sharing data between nodes in a peer-to-peer network, in accordance with an embodiment of the present invention.

FIG. 4 illustrates a distribution tree structure for modeling distribution of data blocks in the peer-to-peer network, in accordance with an embodiment of the present invention.

FIG. 5 illustrates an example architecture for a computing device for use a server or node in a peer-to-peer network, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION

Reference in the specification to “one embodiment” or to “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” or “an embodiment” in various places in the specification are not necessarily all referring to the same embodiment.

Some portions of the detailed description that follows are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps (instructions) leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical, magnetic or optical signals capable of being stored, transferred, combined, compared and otherwise manipulated. It is convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like. Furthermore, it is also convenient at times, to refer to certain arrangements of steps requiring physical manipulations or transformation of physical quantities or representations of physical quantities as modules or code devices, without loss of generality.

However, all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device (such as a specific computing machine), that manipulates and transforms data represented as physical (electronic) quantities within the computer system memories or registers or other such information storage, transmission or display devices.

Certain aspects of the present invention include process steps and instructions described herein in the form of an algorithm. It should be noted that the process steps and instructions of the present invention could be embodied in software, firmware or hardware, and when embodied in software, could be downloaded to reside on and be operated from different platforms used by a variety of operating systems. The invention can also be in a computer program product which can be executed on a computing system.

The present invention also relates to an apparatus for performing the operations herein. This apparatus may be specially constructed for the purposes, e.g., a specific computer, or it may comprise a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, application specific integrated circuits (ASICs), or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus. Memory can include any of the above and/or other devices that can store information/data/programs. Furthermore, the computers referred to in the specification may include a single processor or may be architectures employing multiple processor designs for increased computing capability.

The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general-purpose systems may also be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the method steps. The structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any references below to specific languages are provided for disclosure of enablement and best mode of the present invention.

In addition, the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, the disclosure of the present invention is intended to be illustrative, but not limiting, of the scope of the invention.

Overview

A peer-to-peer (P2P) type distributed architecture is composed of participants, e.g., individual computing resources that make a portion of their resources (e.g., processing power, disk storage or network bandwidth) available to other participants. FIG. 1 illustrates an example configuration of a peer-to-peer network 100 for distributing streaming content. The peer-to-peer network 100 comprises a server 110 and a number of nodes 120 (e.g., nodes A, B, C, D, and E). The server 110 is a computing device that provides coordinating functionality for the network. In one embodiment, the server 110 may be controlled by an administrator and has specialized functionality as will be described below. The nodes 120 are computing devices communicatively coupled to the network via connections to the server 110 and/or to one or more other nodes 120. Examples of computing devices that may act as a server or a node in the peer-to-peer network 100 are described in further detail below with reference to FIG. 5.

In this peer-to-peer network, 100 each node 120 has a neighboring relationship with and maintains information about a bounded subset of neighboring nodes (alternatively referred to as “peer nodes” or “peers” or “partners”) to which it can directly communicate data or from which it can directly receive data. A node 120 does not necessarily have a direct connection to every other node 120 in the network 100. However, information can flow between nodes 120 that are not directly connected via hops between neighboring nodes. Each node 120 maintains a list of its neighboring nodes in the network graph. In one embodiment, the server 110 shares a direct connection with each of nodes 120.

The neighboring relationship between nodes 120 is determined by a membership management protocol. An example of a membership management protocol for a peer-to-peer network is described in U.S. Patent Application No. ______ to Yang, et al. filed on Mar. 4, 2011 and entitled “Network Membership Management for Peer-to-Peer Networking,” which is incorporated by reference herein. In one embodiment, the membership management protocol determines the neighboring relationships between nodes 120 randomly according to a probabilistic formula. Furthermore, the neighboring relationships may change whenever a new node joins the network, when an existing node 120 leaves the network, or during periodic re-subscriptions which serve to rebalance the network graph. When operated in one such implementation, the probabilistically expected average subset size is (c+1)*log₂(N), where c is a design parameter (e.g., a fixed value or a value configured by a network administrator, typically a small integer value) and N is the total number of nodes in the system. The protocol establishes that in such a network, for any constant k, sending a multicast message to log₂(N)+k nodes (who then proceed to recursively forward the message to log₂(N)+k other nodes that have not already seen the message) will reach every node in the network graph with theoretical probability of e^(−ê−k). In one embodiment, the backend server 110 manages nodes according to a pod-based management scheme. An example of a pod-based management scheme is described in U.S. Patent Application No. ______ to Yang, et al. filed on Mar. 4, 2011, and entitled “Pod-Based Server Backend Infrastructure for Peer-Assisted Applications,” which is incorporated by reference herein. Generally in the pod-based management scheme, each “pod” comprises a plurality of nodes and only nodes within the same pod can directly share data. The server dynamically allocates nodes to pods and dynamically allocates computing resources for pushing data to the pods based on characteristics of the incoming data stream and performance of the peer-to-peer sharing. By dynamically adjusting the pod structure and resources available to them based on monitored characteristics, the server 110 can optimize performance of the peer-to-peer network.

In one embodiment, the peer-to-peer network 100 distributes streaming data (e.g., audio, video, or other time-based content) to the nodes 120. The server 110 receives the streaming data 130 from a streaming data source (not shown). The streaming data source may be, for example, an external computing device or a storage device local to the server 110. In one embodiment, the streaming data 130 comprises am ordered sequence of data blocks. Each data block comprises a time-localized portion of the data stream 130. For example, for an input video stream, a data block may comprise a sequence of consecutive video frames from the input video stream (e.g., a 0.5 second chunk of video). For an input audio stream, a data block may comprise a time-localized portion of the audio.

The server 110 then distributes a received data block to one or more nodes 120. The receiving node(s) in turn may distribute the data block to one or more additional nodes, and so on. In this manner, the data block is distributed throughout the peer-to-peer network 100. The number of nodes to which the server 110 distributes a data block may vary depending on the network configuration, and may be vary for different data blocks in the input data stream 130. Similarly, the number of nodes to which a particular node distributes a data block may vary depending on the network configuration, and may also be different for different data blocks.

In one embodiment, the data distribution protocol constrains the timing of the distribution of data blocks in a manner optimized for streaming data. Distribution of streaming data differs from distribution of complete files in that the nodes generally do not store the received data blocks indefinitely, but rather may store them only temporarily until they are outputted. Thus, unlike file sharing protocols where the order and timing of data block distribution is not important, the distribution protocol for streaming data should attempt to provide data blocks within a specified time constraint such that they can be continuously outputted.

The data distribution protocol may be useful, for example, to distribute broadcasts of “live” video or other time-based streams. As used herein, the term “live” does not necessarily require that video stream is distributed concurrently with its capture (as in, for example, a live sports broadcast). Rather, the term “live” refers to data for which it is desirable that all participating nodes receive data blocks in a roughly synchronized manner (e.g., within a time period T of each other). Thus, examples of live data may include both live broadcasts (e.g. sports or events) that are distributed as the data is captured, and multicasts of previously stored video or other data.

In one embodiment, the distribution protocol attempts to ensure delivery of a data block to each node 120 on the network 100 within a time period T seconds from when the server 110 initially outputs the data block. For example, in different embodiments, T could be a few seconds, 5 minutes, or one hour. In one embodiment, if a node 120 cannot receive the media block within the time period T (e.g., due to bandwidth constraints or latency), the block is no longer considered useful to the node 120 and the node may be drop its request for the data block in favor of later blocks. Furthermore, the order in which data blocks are requested and distributed to various nodes 120 may be prioritized in order to optimize the nodes' ability to meet the time constraints, with the goal of enabling the nodes 120 to continuously output the streaming data.

Operation

In one embodiment, each neighboring node pair has a pair of connections: one for control and one for data. It is generally undesirable to have data transfer delay any control message. It is therefore helpful that control traffic be independent of data traffic, because a node may need to quickly request data from a neighboring node (e.g., because it is not able to get the data from its originally selected neighboring node). To accommodate this in one implementation, a node can open a pair of TCP connections and multiplex control packets onto one connection, and data packets onto the other. In this implementation, data and control packets may be out-of-order with respect to one another (though still in-order with respect to packets of the same type).

In one embodiment, the peer-to-peer sharing protocol includes (a) exchanging data availability with a set of nodes, (b) retrieving locally unavailable data from one or more nodes, and (c) supplying locally available data to nodes, as will be described in further detail below.

For each data block received by the server 110, the server 110 selects one or more “partner” nodes to which to distribute the data block. For live streaming, each node should receive the data block by a “playback deadline” such that the nodes can maintain a continuous output stream of the data. For example, for video data, the playback deadline refers to the point in time when a node providing a live output of the video is scheduled to output a particular time-localized block of video. Thus, distribution of data is prioritized with the goal of attempting to ensure that each node in the network receives data blocks by their respective playback deadlines.

Although nodes attempt to receive each data block prior to their respective playback deadline, the nodes do not necessarily receive the data blocks in the exact order that they appear in the streaming data. Rather, a node may receive a data block corresponding to a number of different time slots within in a window of time past the current playback deadline. An example is illustrated in FIG. 2. Streaming data 130 comprises a sequence of data blocks with each data block corresponding to a particular time slot. The server injection point 255 is a time slot corresponding to the data block that the server 110 is currently pushing out to the peer-to-peer network. Thus, in the illustrated example, the server 110 has already pushed all data blocks up to data block in time slot t+W corresponding to the server injection point 255. Over time, the server injection point 255 advances 256 as the server continuously receives and outputs the streaming data. Received data 250 illustrates the data blocks already received by a node A. The playback deadline 253 indicates the time slot corresponding to the data block currently being output by the node A. The playback deadline 253 advances 257 over time as node A continuously outputs the received data blocks. Thus, to enable node A to continuously output the streaming data (e.g., a streaming video), node A attempts to ensure that it receives a data block before the playback point 253 advances to the time slot corresponding to that data block. Node A does not necessarily receive the data blocks in the original data stream order. Thus, in the illustrated example, node A has received data blocks corresponding to time slots t+1, t+2, t+4, and t+7, but is still missing the remaining data blocks in the window 259 between the current playback deadline 253 and the server injection point 255. Node A attempts to ensure that it receives each of these data blocks before the playback deadline 253 advance to the corresponding time slots. In one embodiment, nodes cease sharing of data blocks once the playback deadline 253 has passed the time slot corresponding to those data blocks. Thus, the data blocks that are being shared in the peer-to-peer network at any given moment correspond to the data blocks within a current share window 259 between the current playback deadline 253 (at time t) and the server injection point 255 (at time t+W).

In one embodiment, each node maintains an “incoming queue” and a “commit queue.” The incoming queue identifies a set of data blocks that the node expects to receive within a time window (e.g., the next N time slots in the data stream). The commit queue identifies a set of data blocks the node expects to transmit to other nodes within the time window. In one embodiment, the commit queue of data blocks can be implemented to impose rate limit on transmission of the data blocks. Specifically, an interval can be imposed between the transmissions of data blocks so that data blocks are not sent out back-to-back immediately. The interval imposed allows capacity to be reserved on the network link to allow other data to go through. This rate control can be implemented at the application level.

FIG. 3 illustrates an example of a message passing protocol between two neighboring nodes in the peer-to-peer network (e.g., node 120-A and node 120-B). In the illustrated example, node 120-A acts as a requesting node (also referred to herein as a “child node”) with respect to a particular data block, and node 120-B acts a transmitting node (also referred to herein as a “parent node”). However, each node can perform the functions attributed to both node 120-A and node 120-B, i.e., any node can act as either a parent node or a child node with respect to different data blocks. Furthermore, although the illustrated example only shows two nodes, similar message passing may occur concurrently between a node and any of its neighboring nodes.

Initially, both nodes 120-A, 120-B optionally receive a PARAMETERIZATION message (not shown) specifying various parameters that will be used in the communication protocol. For example, in one embodiment, the PARAMETERIZATION message includes: (a) a data availability broadcast period (e.g., 0-10 min.) (in one embodiment, corresponding to the size of window 259) (b) a data block length corresponding to the size of the data block (e.g., 0-5 min.). The PARAMETERZATION messages are optionally sent by the server 110 prior to data sharing between the nodes.

Node 120-B periodically sends a DATA AVAILABILITY BROADCAST message 201 to its neighboring nodes (including node 120-A). The message 201 may be sent, for example, once per data availability broadcast period. This message identifies the data blocks that node 120-B has available for sharing. The DATA AVAILABILITY BROADCAST message 301 may include, for example, (a) the number of free time slots node 120-B has available for transmission over the next time window (e.g., the next N time slots with each time slot corresponding to a data block), (b) the earliest free time slot node 120-B has, and (c) whether the node 120-B has a specified data block and if it's been scheduled for transmission. Optionally, the node 120-B may communicate a measurement of its current or average bandwidth and transmission delay. In one embodiment, a node maintains a data block availability structure corresponding to the window of blocks it has available for sharing with other nodes. For example, in one embodiment, the data block availability structure comprises a maximum of X data blocks, where X is a fixed integer value or a customizable parameter.

Upon receiving a DATA AVAILABILITY BROADCAST message 301, node 120-A determines 307 which, if any, of the available data blocks it wants to request from node 120-B. Assuming node 120-A wants to request one of the data blocks from node 120-B, node 120-A requests the desired data block by sending a DATA REQUEST message 303 to node 120-B. In one embodiment, in order to alleviate potential problems associated with upload bandwidth hogging, the data protocol may limit a data request to at most one data block from a neighboring node per request (or similarly, some small number). This limitation may reduce the worst case delay of a data block reaching every node in the network. Optionally, the protocol may also prevent a node from requesting a data block that is too old. For example, in one embodiment, a data block is considered too old if it falls into the first N entries of a data map for some parameter N. A data block may also be considered too old if the node would not be able to receive the block before the current playback point reaches the corresponding time slot for the block.

When a node first joins the peer-to-peer network, the new node may be limited to only request data blocks beyond the server injection point 255 plus a configured advance window (e.g., an additional N data blocks). This limitation may help avoid a node falling behind permanently trying to catch up with old data blocks. In another embodiment, when a node has just joined the group, the node should not move the window 259 ahead for B seconds where B can be, for example, 0-300 seconds. B can optionally be chosen by the consumer of the data, which could a video player under the video streaming scenario.

In one embodiment, a node 120-A may receive DATA AVAILABILITY BROADCAST message 301 from a plurality of neighboring nodes and these message may specify one or more of the same data blocks needed by node 120-A. If node 120-A has a choice of neighboring nodes from which to request a particular desired block, node 120-A may first generate a candidate list for each desired block. The list can be partitioned into different groups based on previous responses from these neighboring nodes. Each group can be further sorted using a number of factors, including bandwidth available, observed performance, network distance, time of previous rejection or acceptance, etc. The node 120-A may then use these various factors to determine which neighboring node from which to request the desired data block.

For rare data blocks that are not available on most of neighboring nodes, a node may be less likely to request the data block (i.e., requests for rare data blocks are issued less often). In one embodiment, a rare data block comprises a data block available from less than a threshold number or threshold percentage or neighboring nodes. In one embodiment, the decision to issue a request for such a block can be determined probabilistically to achieve a higher percentage of successful requests. In an alternative embodiment, an entirely different approach may be used in which a node will pursue a rare data block aggressively (i.e., request it more frequently) than data blocks that are more widely available.

Upon receiving a request for data via a DATA REQUEST message 303, a node 120-B determines 309 whether or not accept the request. In one embodiment, a node can collectively commit at most a first threshold X data blocks concurrently to all of its neighboring nodes, where X is a parameterized constant equal to or less than the window size of the data block availability data structure. Furthermore, in one embodiment, a node may commit at most a second threshold N total copies of the same data block to its neighboring nodes over the lifetime of the data block, where N is some parameterized constant. Thus once a node has committed N copies of a data block to neighboring nodes, it will no longer accept requests for that data block. This limitation provides a more even fanout distribution across delivery trees of different data blocks. In one embodiment, a node performs an estimate of whether a data block can be transmitted and received by another node by the playback deadline 253 of the block before committing to transfer of the node. Furthermore, in deciding whether a data block request can be accepted, a node may first check if there is any potential conflict. For example, if accepting a new request for a data block will result in any of the data blocks already in the transmit queue missing their playback deadline.

If node 120-B accepts a request, node 120-B sends a DATA RESPONSE message 305 to the requesting node 120-A indicating which data block(s) it approved for transmission. For accepted requests, node 120-B adds the data block(s) to its commit queue and the requesting node 120-A adds the data block(s) to its incoming queue. Optionally, data blocks can be stamped by nodes each time they are transmitted from one node to another, for example, by incrementing a relay count tracing the number of times the block has been transmitted. This information can be used to maximize performance.

If node 120-B determines to reject node 120-A's a request for a data block, the requesting node 120-A may wait for a period of time or immediately try to request the data block from another node. If node 120-A cannot obtain the data block from any of its neighboring nodes, it may request the data block directly from the server 110.

In one embodiment, the server 110 can pre-burst data to newly joined nodes (i.e., for the most recent N data blocks of the streaming data 130 for some parameter N). The amount of data to be pre-bursted can be adjusted based on the particular stream or configuration. Furthermore, nodes can request missing data from the server 110 at a later time if they are unable to obtain the data from other nodes. For example, in one embodiment, a node determines to request a data block from the server 110 when it would not otherwise be able to obtain the data block in time to meet the playback deadline. Such requests can be batched for a number of blocks. A server 110 may also implement logic to prevent a node from requesting too much data in this way.

Optionally, data blocks in the transmit queue can be sorted based on a number of criteria such as, for example, their sequence in the original data stream, deadline of delivery, urgency of delivery, etc. Optionally, commitments may be prioritized based on tree level, which is lowest at the server and incremented each time the data block is delivered to the next level.

Under the video streaming scenario, the following parameters can be adjusted to achieve the described data sharing efficiency and video startup latency while maintaining the same playback point among nodes: pod size, size of the data blocks, and number of blocks in the window of active sharing among nodes. This scheme is flexible to support different tradeoffs between peer-to-peer sharing efficiency, small startup latency, and synchronized playback.

Analysis 1. Modeling

The distribution of an individual data block can be modeled using a distribution tree structure as illustrated in FIG. 4. For any given data block, a distribution tree 400 illustrates the flow of the data block between interconnected nodes. In the illustrated example, a root node 401 receives a data block 403. The root node 401 may correspond to the server 110. The root node distributes the data block 403 to one or more first level nodes 405, which may be referred to herein as “partners” of the root node 401 with respect to the particular data block 403. The first level nodes 405 then distribute the data block 403 to one or more second level nodes 407, and so on for any number of levels.

Each data block may flow through the nodes in an entirely different manner. Thus, for a window size of W data blocks, there will be W such distribution trees, with each tree corresponding to one of the data blocks. For a given data block, a physical node may appear in a distribution tree multiple times. This occurs, for example, if the node receives the data block from two or more different neighboring nodes. To distinguish between a physical node and a point in the distribution tree, the points in the distribution tree are referred to herein as s-nodes while physically separate nodes are referred to as “nodes.” Thus, a node may appear multiple times in a given distribution tree and may therefore correspond to multiple s-nodes in the same tree.

The distribution tree may change for each data block distributed by the server 110. Thus, a node does not always receive media blocks from the same nodes and a node (or server) does not always distribute media blocks to the same nodes. Thus, for each data block distributed from the server, a distribution tree may arise that looks totally different than the distribution tree for previous or subsequent data blocks. As a result, a node may be located at different levels in distribution trees of different data blocks. A node affects more children in a tree where it is closer to the server than in a tree where it is closer to the bottom. Also, queuing delay introduced by a node adds to the overall delay experienced by the leaves (nodes that only receive but do not transmit the data block).

2. Tree Depth, Overlay Radius, and Coverage Ratio

Tree Depth, or Overlay Radius, for a particular group size directly affects delay and robustness. Related to this is Coverage Ratio, which is percentage of nodes covered within a certain depth.

2.1 Proof

In the distribution tree, the root node is at level 0. As previously discussed nodes may appear multiple times at different levels or within the same level. In the following discussion, nodes are numbered based on their appearances in the breadth-first search.

For an s-node t, the identifier, or the index, assigned to it is denoted as Pt. The root node's identifier is 1, the first (e.g., leftmost) child of root node's identifier is 2, and so on. For simplicity, a homogeneous link bandwidth condition may be assumed for all nodes. For an individual node, the depth of its first appearance in the distribution tree is an important factor. The expected tree depth of a group with N nodes is thus the average tree depth of all N nodes.

An auxiliary function δ(t) is defined as:

${\delta (t)} = \left\{ \begin{matrix} {1,{{{if}\mspace{14mu} {\delta (t)}} \neq {\delta \left( t^{\prime} \right)}},\mspace{14mu} {0 < t^{\prime} < t}} \\ {0,{otherwise}} \end{matrix} \right.$

In other words, δ(t) is 1 if and only if the s-node t corresponds to the first appearance of the node in the tree.

Another auxiliary function is defined as:

f(t)=total number of unique nodes associated with s-nodes 1 through t.

Because membership and partnership are formed randomly among all nodes, the probability of an s-node t being the first appearance of a node is given by:

$\begin{matrix} {{\Pr \left\lbrack {{\delta (t)} = 1} \right\rbrack} = \frac{N - {f\left( {t - 1} \right)}}{N}} & (1) \end{matrix}$

Note that:

δ(t)=f(t−1)   (2)

Taking expectations of (1) and (2), yields:

${E\left\lbrack {{f(t)} - {f\left( {t - 1} \right)}} \right\rbrack} = {{E\left\lbrack {\delta (t)} \right\rbrack} = \frac{N - {E\left\lbrack {f\left( {t - 1} \right)} \right\rbrack}}{N}}$

Thus:

$\begin{matrix} {{{E\left\lbrack {f(t)} \right\rbrack} = {{E\left\lbrack {f\left( {t - 1} \right)} \right\rbrack} + \frac{N - {E\left\lbrack {f\left( {t - 1} \right)} \right\rbrack}}{N}}}{{E\left\lbrack {f(t)} \right\rbrack} = {1 + {\frac{N - 1}{N}{E\left\lbrack {f\left( {t - 1} \right)} \right\rbrack}}}}} & (3) \end{matrix}$

which gives the iteration for expected number of unique nodes from one s-node to the next. Note that:

f(t)=1   (4)

Also, note that:

$\begin{matrix} {{E\left\lbrack {f(2)} \right\rbrack} = {{1 + \frac{N - 1}{N}} = {{N\left( \frac{{2N} - 1}{N^{2}} \right)} = {N\left( {1 - \left( \frac{N - 1}{N} \right)^{2}} \right)}}}} & (5) \end{matrix}$

This forms the iteration base which holds for t=2:

$\begin{matrix} {{E\left\lbrack {f\left( {t - 1} \right)} \right\rbrack} = {N\left\lbrack {1 - \left( \frac{N - 1}{N} \right)^{t - 1}} \right\rbrack}} & (6) \end{matrix}$

Thus:

$\begin{matrix} {{E\left\lbrack {f(t)} \right\rbrack} = {1 + {\frac{N - 1}{N}\left( {N\left( {1 - \left( \frac{N - 1}{N} \right)^{t - 1}} \right)} \right.}}} \\ {= {1 + {\left( {N - 1} \right)\left( {1 - \left( \frac{N - 1}{N} \right)^{t - 1}} \right)}}} \\ {= {1 + {\left( {N - 1} \right)\left( \frac{N^{t - 1} - \left( {N - 1} \right)^{t - 1}}{N^{t - 1}} \right)}}} \\ {= {1 + \frac{N^{t} - N^{t - 1} - \left( {N - 1} \right)^{t}}{N^{t - 1}}}} \\ {= {N\left( {\frac{1}{N} + \frac{N^{t} - N^{t - 1} - \left( {N - 1} \right)^{t}}{N^{t}}} \right)}} \\ {= {N\left( {1 - \left( {1 - \frac{1}{N} - \frac{\left. {N^{t} - N^{t - 1} - \left( {N - 1} \right)^{t}} \right)}{N^{t}}} \right)} \right)}} \\ {= {N\left( {1 - \frac{N^{t} - N^{t - 1} - N^{t} + N^{t - 1} + \left( {N - 1} \right)^{t}}{N^{t}}} \right)}} \\ {= {N\left( {1 - \left( \frac{N - 1}{N} \right)^{t}} \right)}} \end{matrix}$

Thus:

$\begin{matrix} {{E\left\lbrack {f(t)} \right\rbrack} = {N\left( {1 - \left( \frac{N - 1}{N} \right)^{t}} \right)}} & (7) \end{matrix}$

Note that:

$\begin{matrix} {\left( \frac{N - 1}{N} \right)^{t} > ^{- \frac{t}{N}}} & (8) \end{matrix}$

Thus:

$\begin{matrix} {{E\left\lbrack {f(t)} \right\rbrack} > {N\left( {1 - ^{- \frac{t}{N}}} \right)}} & (9) \end{matrix}$

t_(k) denotes the identifier of the last s-node at level k. The number of new unique nodes at level k, but not level 0−(k−1), is then:

f(t _(k))−(f(t _(k−1))   (10)

The expected distance (depth) d of all nodes is then:

$\begin{matrix} {d = {\frac{1}{N}{\sum\limits_{k = 1}^{\infty}\left( {k*{E\left\lbrack {{f\left( t_{k} \right)} - {f\left( t_{k - 1} \right)}} \right\rbrack}} \right)}}} & (11) \end{matrix}$

Note:

when k→∞, E[f(t _(k))]=N   (12)

Thus:

$\begin{matrix} {{\lim_{k\infty}{k\left( {1 - \frac{e\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N}} \right)}} = 0} & (13) \end{matrix}$

From (11), taking N into the summation yields:

$\begin{matrix} \begin{matrix} {d = {\sum\limits_{k = 1}^{\infty}\left( {k\left( {\frac{E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N} - \frac{E\left\lbrack {f\left( t_{k - 1} \right)} \right\rbrack}{N}} \right)} \right)}} \\ {= {\sum\limits_{k = 1}^{\infty}\left( {k\left( {1 - 1 + \frac{E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N} - \frac{E\left\lbrack {f\left( t_{k - 1} \right)} \right\rbrack}{N}} \right)} \right)}} \\ {= {\sum\limits_{k = 1}^{\infty}\left( {k\left( {\left( {1 - \frac{E\left\lbrack {f\left( t_{k - 1} \right)} \right\rbrack}{N}} \right) - \left( {1 - \frac{E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N}} \right)} \right)} \right)}} \end{matrix} & (14) \end{matrix}$

Another way to reach (14) is by noting that the following is equivalent of (10):

$\begin{matrix} \begin{matrix} {{f\left( t_{k} \right)} - \left( {{f\left( t_{k - 1} \right)} = {\frac{N - {E\left\lbrack {f\left( t_{k - 1} \right)} \right\rbrack}}{N} - \frac{N - {E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}}{N}}} \right.} \\ {= {\left( {1 - \frac{E\left\lbrack {f\left( t_{k - 1} \right)} \right\rbrack}{N}} \right) - \left( {1 - \frac{E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N}} \right)}} \end{matrix} & (15) \end{matrix}$

This is because the probability of unique new nodes appearing after level (k−1) is:

$\begin{matrix} \frac{N - {E\left\lbrack {f\left( t_{k - 1} \right)} \right\rbrack}}{N} & (16) \end{matrix}$

and the probability of unique new nodes appearing after level k is:

$\begin{matrix} \frac{N - {E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}}{N} & (17) \end{matrix}$

Eq. (14) may be solved by expanding each term in the summation. Expansion of each individual term with a unique k value of i “offsets” (i−1) number of the right term of the expansion for the k value of (i−1), thus:

$\begin{matrix} \begin{matrix} {d = {\left( {1 - \frac{E\left\lbrack {f\left( t_{0} \right)} \right\rbrack}{N}} \right) - {\left( {1 - \frac{E\left\lbrack {f\left( t_{1} \right)} \right\rbrack}{N}} \right)\mspace{14mu} \left( {k = {{0\mspace{14mu} {and}\mspace{14mu} k} = 1}} \right)} +}} \\ {{{2\left( {1 - \frac{E\left\lbrack {f\left( t_{1} \right)} \right\rbrack}{N}} \right)} - {2\left( {1 - \frac{E\left\lbrack {f\left( t_{2} \right)} \right\rbrack}{N}} \right)\left( {k = 2} \right)} + \ldots +}} \\ {{{\left( {i - 1} \right)\left( {1 - \frac{E\left\lbrack {f\left( t_{i - 1} \right)} \right\rbrack}{N}} \right)} -}} \\ {{{\left( {i - 1} \right)\left( {1 - \frac{E\left\lbrack {f\left( t_{i} \right)} \right\rbrack}{N}} \right)\left( {k = {i - 1}} \right)} +}} \\ {{{(i)\left( {1 - \frac{E\left\lbrack {f\left( t_{i - 1} \right)} \right\rbrack}{N}} \right)} - {(i)\left( {1 - \frac{E\left\lbrack {f\left( t_{i} \right)} \right\rbrack}{N}} \right)\mspace{14mu} \left( {k = i} \right)} +}} \\ {{{(i)\left( {1 - \frac{E\left\lbrack {f\left( t_{i - 1} \right)} \right\rbrack}{N}} \right)} - {(i)\left( {1 - \frac{E\left\lbrack {f\left( t_{i} \right)} \right\rbrack}{N}} \right)\mspace{14mu} \left( {k = i} \right)} + \ldots}} \\ {= {\left( {1 - \frac{1}{N}} \right) + \left( {1 - \frac{E\left\lbrack {f\left( t_{1} \right)} \right\rbrack}{N}} \right) + \left( {1 - \frac{E\left\lbrack {f\left( t_{2} \right)} \right\rbrack}{N}} \right) + \ldots +}} \\ {{\left( {1 - \frac{E\left\lbrack {f\left( t_{i} \right)} \right\rbrack}{N}} \right) + \ldots + \left( {1 - \frac{E\left\lbrack {f\left( {}_{k = \infty} \right)} \right\rbrack}{N}} \right)}} \\ {d = {\sum\limits_{k = 0}^{\infty}\left( {1 - \frac{E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N}} \right)}} \end{matrix} & (18) \end{matrix}$

Combining (7) and (18) yields:

$\begin{matrix} {d = {\sum\limits_{k = 0}^{\infty}\left( {1 - \frac{N\left( {1 - \left( \frac{N - 1}{N} \right)^{t_{k}}} \right)}{N}} \right)}} \\ {= {\sum\limits_{k = 0}^{\infty}\left( \left( \frac{N - 1}{N} \right)^{t_{k}} \right)}} \end{matrix}$ $\begin{matrix} {d = {\sum\limits_{k = 0}^{\infty}\left( {1 - \frac{N\left( {1 - \left( \frac{N - 1}{N} \right)^{t_{k}}} \right.}{N}} \right)}} \\ {= {\sum\limits_{k = 0}^{\infty}\left( \frac{N - 1}{N} \right)^{t_{k}}}} \end{matrix}$

Then, combining (7), (8) and (18), yields:

$\begin{matrix} {d < {\sum\limits_{k = 0}^{\infty}^{- \frac{t_{k}}{N}}}} & (19) \end{matrix}$

Before solving this summation, note that:

$\begin{matrix} {t_{k} = {1 + M + {M\left( {M - 1} \right)} + {M\left( {M - 1} \right)}^{2} +}} \\ {{{M\left( {M - 1} \right)^{3}} + \ldots + {M\left( {M - 1} \right)}^{k - 1}}} \\ {= {1 + {M*{\sum\limits_{i = 0}^{k - 1}\left( {M - 1} \right)^{i}}}}} \\ {= {1 + \frac{M\; 1\left( {1 - \left( {M - 1} \right)^{k}} \right)}{1 - \left( {M - 1} \right)}}} \\ {= {1 + {M\; \frac{1 - \left( {M - 1} \right)^{k}}{2 - M}}}} \\ {= {{\frac{\left( {M - 1} \right)^{k} - 1}{M - 2}M} + 1}} \\ {= \frac{{M\left( {M - 1} \right)}^{k} - M + M - 2}{M - 2}} \\ {= \frac{{M\left( {M - 1} \right)}^{k} - 2}{M - 2}} \end{matrix}$

Thus:

$\begin{matrix} {t_{k} = \frac{{M\left( {M - 1} \right)}^{k} - 2}{M - 2}} & (20) \end{matrix}$

Dividing (19) into two parts, the first part from k=0 to k=log_(M−1) N, the second part from k=log_(M−1) N+1 to k=∞,

$\begin{matrix} {d < {{\sum\limits_{k = 0}^{\log_{M - 1}N}^{\frac{{- {M{({M - 1})}}^{k}} - 2}{{({M - 2})}N}}} + {\sum\limits_{k = {{\log_{M - 1}N} + 1}}^{\infty}^{- \frac{{M{({M - 1})}^{k}} - 2}{{({M - 2})}N}}}}} & (21) \\ {< {{\log_{M - 1}N} + 1 + {\sum\limits_{k = 0}^{\infty}^{- \frac{{{MN}{({M - 1})}^{k}} - 2}{{({M - 2})}N}}}}} & (22) \end{matrix}$

Note that:

$\frac{{MN}\left( {M - 1} \right)}{\left( {M - 2} \right)N} > 1$

So:

$\begin{matrix} {d \leq {{\log_{M - 1}N} + 1 + {\sum\limits_{k = 0}^{\infty}^{- {({M - 1})}^{k}}}}} & (23) \end{matrix}$

For M≧3:

(M−1)^(k)≧(M−1)k   (24)

Thus:

e ^(−(M−1)) ^(k) ≦e ^(−(M−1)k)   (25)

So:

$\begin{matrix} {d < {{\log_{M - 1}N} + 1 + {\sum\limits_{k = 0}^{\infty}^{{- {({M - 1})}}k}}}} & (26) \\ {\mspace{14mu} {= {{\log_{M - 1}N} + 1 + \frac{1}{1 - ^{- {({M - 1})}}}}}} & (27) \\ {\mspace{14mu} {< {{\log_{M - 1}N} + 3}}} & (28) \end{matrix}$

2.2 Tree Depth/Overlay Radius.

(28) shows that the average distance of a node from the root node is bounded by O(log(N)):

d=O(log N)   (29)

2.3 Coverage Ratio.

From (7), (9) and (20), we also have

$\begin{matrix} \begin{matrix} {{{coverage}\mspace{14mu} {ratio}\mspace{14mu} {at}\mspace{14mu} {level}\mspace{14mu} k} = {\frac{E\left\lbrack {f\left( t_{k} \right)} \right\rbrack}{N} > \frac{N\left( {1 - ^{- \frac{t_{k}}{N}}} \right)}{N}}} \\ {= {1 - ^{- \frac{t_{k}}{n}}}} \\ {= {1 - ^{\frac{{M{({M - 1})}}^{k} - 2}{M - 2}}}} \end{matrix} & (30) \end{matrix}$

2.4 Notes

A heterogeneous environment where different nodes have different uplink bandwidth affects fanout of each node. The larger fanout of a node with fat upload link offsets to a degree the smaller fanout of another node. This does not affect the analysis herein.

Nodes that cannot support any upload, either because a narrow uplink or firewall, can only serve as leaves. This does not affect the conclusion above for a single tree. Its impact on analysis of multi-tree is described below.

3. Multi-Tree in a Window

The section above examines characteristics of the tree for one data block. Next, the relation between trees within the same window is discussed. Specifically, the following discussion illustrates: (a) whether there is enough bandwidth to support streaming need for all nodes while the uplink bandwidth constraint of each node is met; (b) what requirement an individual node should meet in allocating its uplink bandwidth order to achieve optimal performance for the group collectively; and (c) how the root node can do in selecting its immediate partners and distributing data across the partners to provide best performance possible for the group.

The tree can be modeled as described below. At any given point, a snapshot of the random graph following the flow of data, one distribution tree is obtained for each data block. For a window size of W data blocks, there will be W such trees, each tree corresponding to one data block. A tree here is different from a regular tree in that a node may appear in the tree multiple times because these nodes form a graph (i.e. a node may receive the same data block from more than one neighboring node). This type of tree a is referred to herein as a “Tree with Redundant Nodes”, or simply “tree” hereinafter, unless specified otherwise.

The trees are numbered from 1 to W and each tree is denoted as T₁, T₂, T₃, . . . T_(i), . . . T_(w).

3.1 Partner Selection and Data block Scheduling Policy at Root

Various policies may be used to determine how the root node should select its partners for the initial injection of data blocks into the network. In the very simple case, where the root node selects only one node, A, as its sole partner, A will receive all data blocks within the window and will further deliver all the data blocks to other nodes. For any tree T_(i), fanout at level 0 is 1. Also, due to A's uplink bandwidth limit, A can support at most one child in each tree for a maximum of W children across W trees. Thus, the fanout is 1 at level 1 for A in any tree T_(i). This means that every tree actually would reduce to a line.

In a second case, the root node selects M peers, P₁, P₂, . . . , P_(M), as its partners (M>1). Furthermore, the root nodes sends out exactly one copy of each data block to one of these partners. In alternative embodiments, the root node can send out multiple copies of the same data block to multiple partners. This may add a level of robustness, but generally does not affect the major performance characteristics. Different policies may be applied at the root node for this distribution. For example, the root node could distribute the data blocks to its partners in a round-robin fashion, one data block at a time per partner. Alternatively, the root node may send W/M consecutive data blocks to one partner, then move on to the next partner. For the description below, it is assumed that the round-robin approach is used.

3.2 Bandwidth Utilization

In the second case of section 3.1 above (where the root node selects M peers, P₁, P₂, . . . , P_(M), as its partners), fanout from the root node for any tree T_(i) is 1. Fanout from level 1 is (M−1). P₁ would appear in W/M trees corresponding to T₁, T_(M+1), T_(2M+1), . . . , T_(W−M+1). This group of trees is referred to herein as the Tree Group of P₁. P₁ would then utilize

$\left( {M - 1} \right)\frac{W}{M}$

units worth of its upload bandwidth in total to distribute these data blocks, with W/M units worth of bandwidth left (a node can support a maximum of W units of upload bandwidth). This means in other trees, P₁ would mostly be located as leaf level, not contributing to upload much. Further, note that this applies to children of P₁ in these trees as well, i.e., those nodes are inner nodes and contribute most of their uplink bandwidth in these trees. They will be located at leaf level in most of other trees. This is generally feasible, though, given the ratio of inner nodes to leaf nodes in an (M−1)-way tree. For a tree with N nodes, leaf nodes account for

$\frac{M - 1}{M}$

portion of all nodes, while inner nodes taking up 1/M. (fanout at level 0 is M, that does not change the portion in a material way).

In trees T₁, T_(M+1), T_(2M+1), . . . , T_(W−M+1) or the tree group of P₁, P₁'s children could vary, depending on the dynamics of the partnership formation. If M is small, (e.g., 4), P₁'s children in those trees could well be the same. These children of P₁ would almost use up their uplink bandwidth in P₁'s tree group. Each of them has W/M units worth of bandwidth left, for a total of

$\frac{W}{M}\left( {M - 1} \right)$

units worth of bandwidth for other tree groups. This is the total download bandwidth P₁ would need in the other (M−1) tree groups. The overall bandwidth consumption is balanced at the highest level, since each node is contributing at least as much as it uses.

3.3 Delay Within a Single Tree

Performance in peer-to-peer sharing may be measured by various characteristics including, for example, how long it takes a data block to be delivered to a leaf node, and how long it takes for a node to accumulate all W data blocks in order to start playback.

Within a single tree T_(i), the expected tree depth is bounded by O(log N). An inner node also needs to support (M−1) children. In the worst case, data block i would take (M−1)*tree-depth to reach a leaf node, if all ancestors of this leaf node are the last one in the transmission queue of their corresponding parents. This delay is given by:

$\begin{matrix} {\Delta_{{one} - {tree}} = {{\left( {M - 1} \right) \cdot {tree}} - {depth}}} \\ {\leq {\left( {M - 1} \right){O\left( {\log (N)} \right)}}} \end{matrix}$

3.4 Delay Within a Tree Group

Within a tree group, (e.g., the tree group of P₁) data blocks can be transferred down each tree in a “pipelined” fashion. The timing and delay of delivery of those data blocks are interdependent because they share a lot of common inner nodes. Each inner node there “serializes” transfer of data blocks 1, 1+M, 1+2M, . . . W−M+1. Assuming a node always transfer data blocks in the order of the data block id number, there would be a (M−1) seconds shift in delivery time between consecutive trees in the group. This shift, Δ_(inter-tree), is constrained as follows: 1≦Δ_(inter-tree)≦(M−1).

The last data block in the group, namely data block (W−M+1), would arrive at a leaf node

$\left( {M - 1} \right)\left( {\frac{W}{M} - 1} \right)$

seconds later than data block 1. If the root node starts sending out data block 1 and data block (W−M+1) at time t, then the last leaf node receiving data block 1 will receive it at time t+(M−1)log(N), and the last node receiving data block (W−M+1) would get that data block at time

$t + {\left( {M - 1} \right)\log \; N} + {\left( {M - 1} \right){\left( {\frac{W}{M} - 1} \right).}}$

3.5 Delay Across Tree Groups

Across tree groups, the transfer can take place in parallel to a large degree because there is very little overlap between inner nodes in these tree groups. An inner node in one tree group still contributes W/M worth of bandwidth in other tree groups. So the extra shift delay across tree groups is W/M seconds. This delay, Δ_(inter-group), is constrained as:

$\Delta_{{inter} - {group}} \leq \frac{W}{M}$

seconds.

3.6 Overall Delay, Buffering Time at Startup

The maximum overall shift delay caused by “serialization” among all W trees is:

${{\Delta_{{inter}\text{-}{tree}}^{*}{{{trees}\mspace{14mu} {in}\mspace{14mu} {one}\mspace{14mu} {tree}\mspace{14mu} {group}}}} + \Delta_{{inter} - {group}}} = {{{\left( {M - 1} \right)\left( {\frac{W}{M} - 1} \right)} + \frac{w}{M}} = {W - {\left( {M - 1} \right){seconds}}}}$

This means a peer can receive a first data block in at most (M−1log N seconds, and receive all the other (W-1) data blocks in the window within W−(M-1) seconds thereafter. The buffering time Δ_(buffering) needed by a newly joined node is:

Δ_(buffering) = Δ_(one − tree) + Δ_(inter − tree)^(*)trees  in  one  tree  group + Δ_(inter − group) ≤ (M − 1)O(log  N) + W − (M − 1)

There are two cases. In case (A), for a node close to the bottom of all trees, the (M−1)O(log N) seconds delay is largely invisible to end-user, because the differential in data block arrival time across tree groups is not big. As a result, the buffering time needed by a node is around W−(M−1) seconds. Intuitively, a node tends to be located at about the same level across trees and tree groups. For example, a newly joined node will logically be located close to bottom of all trees. Thus, case (A) is expected to be the majority of the cases. In case (B), for a node that is at level 1 in a tree group and at leaf level in other tree groups, this node could receive its first data block very fast, then wait for an additional (M−1)O(log N)+W−(M−1) seconds to receive the rest of the data blocks in the window.

3.7 Ordering of Data Blocks Transfer by a Node

The order in which a node transfers its data blocks affects overall performance of the peer-to-peer network. Suppose a node is ready to transfer data blocks 1, 5, 7, and 8 to its partners. Under different policies, the node may, for example, transfer the data blocks based on the data block ID (i.e., lowest to highest with the lowest ID corresponding to an earlier time slot in the streaming data), or the node may transfer the data blocks in the order the requests are received. From the analysis above, the exact order of transfer does not affect the overall throughput. All data blocks should be able to arrive within the W-second window, assuming there are no transmission errors. Yet, since data block 1 would be needed earlier than data blocks 5, 7 and 8, it appears reasonable to always transfer 1 first, thus providing a bigger head room for its delivery. Thus, in one embodiment, a preferred approach is to order data block transfers simply based on their data block ID numbers. This also suggests that the root node should perform round-robin with one data block per unit between its M partners instead of transferring W/M consecutive data blocks to a partner node. The reason is that the arrival time would then favor those earlier data blocks needed for playback.

4. Discontinuity

The following parameters may be used to derive the probability of a node experiencing discontinuity:

-   -   P_(f)—the probability of node failure. Node leave is also a form         of “node failure” and will be counted for in this.     -   P_(o)—the probability that a dependent node cannot find an         alternative supplier partner for a particular data block within         Δt time;     -   P_(s)—the probability that a partner can support full rate         streaming for a dependent node once needed.     -   P_(d)—the probability that a node experiencing discontinuity.         This is also the percentage of nodes in a group that may suffer         discontinuity.

This is a summation of the probability of finding an alternative supplier node for each node failure case. The probability of having exactly i number of failed partners is:

(1−P_(f))^(M−1)P_(f) ^(i)

The probability of none of the (M−1) non-failing nodes cannot be an alternative supplier node is:

(1−P_(s))^(M−1)

If none of the existing partners can become the alternative supplier, the probability of not finding a new partner that can supply the data is P_(o). Thus:

$P_{d} = {P_{o} \cdot \left\lbrack {\sum\limits_{i = 1}^{M}{\begin{pmatrix} M \\ i \end{pmatrix}\left( {1 - P_{f}} \right)^{M - i}{P_{f}^{i}\left( {1 - P_{s}} \right)}^{M - i}}} \right\rbrack}$

If the peer-to-peer sharing protocol can manage to keep P_(o) big and P_(s) small, then P_(d) can also be kept small. P_(o) and P_(s) depend on the protocol operation. Ps can be reasonably high, (e.g., 0.5 seconds). However, using P_(s) here could be a conservative estimate, because a node can retrieve data from multiple partners collectively.

P_(o) can indeed be very small, especially if a node keeps around a large cache with a lot of “backup” mode nodes in it. They can be contacted immediately when exiting partners cannot supply all the data. In one embodiment, a P_(o) of 10% is used.

The expected number of nodes suffering from discontinuity is then:

${N \cdot P_{d}} = {N \cdot P_{o} \cdot \left\lbrack {\sum\limits_{i = 1}^{M}{\begin{pmatrix} M \\ i \end{pmatrix}\left( {1 - P_{f}} \right)^{M - i}{P_{f}^{i}\left( {1 - P_{s}} \right)}^{M - i}}} \right\rbrack}$

System Architecture

FIG. 5 is a high-level block diagram illustrating an example of a computing device 500 that could act as a node or a server 102 (or sub-server 106) on the peer-to-peer network 100. Illustrated are at least one processor 502, and input controller 504, a network adaptor 506, a graphics adaptor 508, a storage device 510, and a memory 512. Other embodiments of the computer 500 may have different architectures with additional or different components. In some embodiments, one or more of the illustrated components are omitted.

The storage device 510 is a computer-readable storage medium such as a hard drive, compact disk read-only memory (CD-ROM), DVD, or a solid-state memory device. The memory 512 store instructions and data used by the processor 502. The pointing device 526 is a mouse, track ball, or other type of pointing device, and is used in combination with the keyboard 524 to input data into the computer system 500. The graphics adapter 508 outputs images and other information for display by the display device 522. The network adapter 506 couples the computer system 500 to a network 530.

The computer 500 is adapted to execute computer program instructions for providing functionality described herein. In one embodiment, program instructions are stored on the storage device 510, loaded into the memory 512, and executed by the processor 502 to carry out the processes described herein.

The types of computers 500 operating on the peer-to-peer network can vary substantially. For example, a node comprising a personal computer (PC) may include most or all of the components illustrated in FIG. 5. Another node may comprise a mobile computing device (e.g., a cell phone) which typically has limited processing power, a small display 522, and might lack a pointing device 526. A server 110 may comprise multiple processors 502 working together to provide the functionality described herein and may lack an input controller 504, keyboard 524, pointing device 526, graphics adapter 508 and display 522. In other embodiments, the nodes or the server could comprises other types of electronic device such as, for example, a personal digital assistant (PDA), a mobile telephone, a pager, a television “set-top box,” etc.

The network 530 enables communications among the entities connected to it (e.g., the nodes and the server). In one embodiment, the network 530 is the Internet and uses standard communications technologies and/or protocols. Thus, the network 530 can include links using a variety of known technologies, protocols, and data formats. In addition, all or some of links can be encrypted using conventional encryption technologies. In another embodiment, the entities use custom and/or dedicated data communications technologies.

Upon reading this disclosure, those of skill in the art will appreciate still additional alternative designs for membership management having the features described herein. Thus, while particular embodiments and applications of the present invention have been illustrated and described, it is to be understood that the invention is not limited to the precise construction and components disclosed herein and that various modifications, changes and variations which will be apparent to those skilled in the art may be made in the arrangement, operation and details of the method and apparatus of the present invention disclosed herein without departing from the spirit and scope of the invention as defined in the appended claims. 

1. A method for distributing streaming data in a peer-to-peer network, the method performed by a first node in the peer-to-peer network, the method comprising: receiving, by the first node, a data availability broadcast message from a first neighboring node, the data availability broadcast message identifying one or more data blocks that the first neighboring node has available for transmission, the one or more data blocks comprising time-localized portions of the streaming data; determining, by the first node, a desired data block selected from the one or more data blocks specified in the data availability broadcast message, the desired data block selected such that the first node receives the desired data block prior to a playback deadline for the first data block; transmitting, by the first node, a data request message to the first neighboring node specifying the desired data block; and receiving, by the first node, the desired block from the first neighboring node.
 2. The method of claim 1, wherein the streaming data comprises streaming video data and wherein the first node prioritizes an order of the data request message such that the first node continuously outputs the streaming video data to a display.
 3. The method of claim 1, wherein determining the desired data block comprises: maintaining an incoming queue of incoming data blocks scheduled for transmission to the first node within a time window; and determining the desired data block from among the data blocks within the time window that are absent from the incoming queue.
 4. The method of claim 1, further comprising: receiving directly from a server, a pre-burst of a plurality of data blocks, the pre-burst corresponding to a beginning of a new data stream.
 5. The method of claim 1, further comprising: determining a desired data block that is unavailable from neighboring nodes; transmitting a request for the desired data block to a server; and receiving the desired data block from the server.
 6. The method of claim 1, further comprising: transmitting a data availability broadcast message to a plurality of neighboring nodes, the data availability broadcast message identifying one or more data blocks available for transmission by the first node; receiving from a second neighboring node, a data request specifying at least one desired data block selected from among the one or more data blocks available for transmission by the first node; determining whether or not to accept the data request; responsive to determining to accept the data request, transmitting the desired data block to the second neighboring node.
 7. The method of claim 6, further comprising: rejecting the data request responsive to determining that the first node is already currently transmitting at least a first threshold number of data blocks; and rejecting the data request responsive to determining that the first node has previously transmitted the desired data block to at least a second threshold number of nodes.
 8. A computer-readable storage medium storing computer-executable instructions for distributing streaming data in a peer-to-peer network, the instructions when executed by a processor cause the processor to perform steps including: receiving a data availability broadcast message from a first neighboring node, the data availability broadcast message identifying one or more data blocks that the first neighboring node has available for transmission, the one or more data blocks comprising time-localized portions of the streaming data; determining a desired data block selected from the one or more data blocks specified in the data availability broadcast message, the desired data block selected such that the first node receives the desired data block prior to a playback deadline for the first data block; transmitting a data request message to the first neighboring node specifying the desired data block; and receiving the desired block from the first neighboring node.
 9. The computer-readable storage medium of claim 8, wherein the streaming data comprises streaming video data and wherein the first node prioritizes an order of the data request message such that the first node continuously outputs the streaming video data to a display.
 10. The computer-readable storage medium of claim 8, wherein determining the desired data block comprises: maintaining an incoming queue of incoming data blocks scheduled for transmission to the first node within a time window; and determining the desired data block from among the data blocks within the time window that are absent from the incoming queue.
 11. The computer-readable storage medium of claim 8, wherein the instructions when executed further cause the processor to perform steps including: receiving directly from a server, a pre-burst of a plurality of data blocks, the pre-burst corresponding to a beginning of a new data stream.
 12. The computer-readable storage medium of claim 8, wherein the instructions when executed further cause the processor to perform steps including: determining a desired data block that is unavailable from neighboring nodes; transmitting a request for the desired data block to a server; and receiving the desired data block from the server.
 13. The computer-readable storage medium of claim 8, wherein the instructions when executed further cause the processor to perform steps including: transmitting a data availability broadcast message to a plurality of neighboring nodes, the data availability broadcast message identifying one or more data blocks available for transmission by the first node; receiving from a second neighboring node, a data request specifying at least one desired data block selected from among the one or more data blocks available for transmission by the first node; determining whether or not to accept the data request; responsive to determining to accept the data request, transmitting the desired data block to the second neighboring node.
 14. The computer-readable storage medium of claim 13, wherein the instructions when executed further cause the processor to perform steps including: rejecting the data request responsive to determining that the first node is already currently transmitting at least a first threshold number of data blocks; and rejecting the data request responsive to determining that the first node has previously transmitted the desired data block to at least a second threshold number of nodes.
 15. A system for distributing streaming data in a peer-to-peer network, the system comprising: one or more processors; and a computer-readable storage medium storing computer-executable instructions the instructions when executed by the one or more processors cause the one or more processors to perform steps including: receiving a data availability broadcast message from a first neighboring node, the data availability broadcast message identifying one or more data blocks that the first neighboring node has available for transmission, the one or more data blocks comprising time-localized portions of the streaming data; determining a desired data block selected from the one or more data blocks specified in the data availability broadcast message, the desired data block selected such that the first node receives the desired data block prior to a playback deadline for the first data block; transmitting a data request message to the first neighboring node specifying the desired data block; and receiving the desired block from the first neighboring node.
 16. The system of claim 15, wherein the streaming data comprises streaming video data and wherein the first node prioritizes an order of the data request message such that the first node continuously outputs the streaming video data to a display.
 17. The system of claim 15, wherein determining the desired data block comprises: maintaining an incoming queue of incoming data blocks scheduled for transmission to the first node within a time window; and determining the desired data block from among the data blocks within the time window that are absent from the incoming queue.
 18. The system of claim 15, wherein the instructions when executed further cause the one or more processors to perform steps including: receiving directly from a server, a pre-burst of a plurality of data blocks, the pre-burst corresponding to a beginning of a new data stream.
 19. The system of claim 15, wherein the instructions when executed further cause the one or more processors to perform steps including: determining a desired data block that is unavailable from neighboring nodes; transmitting a request for the desired data block to a server; and receiving the desired data block from the server.
 20. The system of claim 15, wherein the instructions when executed further cause the one or more processors to perform steps including: transmitting a data availability broadcast message to a plurality of neighboring nodes, the data availability broadcast message identifying one or more data blocks available for transmission by the first node; receiving from a second neighboring node, a data request specifying at least one desired data block selected from among the one or more data blocks available for transmission by the first node; determining whether or not to accept the data request; responsive to determining to accept the data request, transmitting the desired data block to the second neighboring node. 